from django.urls import path
from . import views

app_name = 'accounts'

urlpatterns = [
    path('login/', views.login_view, name='login'),
    path('logout/', views.logout_view, name='logout'),
    path('signup/', views.signup, name='signup'),
    path('profile/', views.profile_view, name='profile'),
    path('edit_profile/', views.edit_profile, name='edit_profile'),
    path('change_password/', views.change_password, name='change_password'),
    path('force_change_password/', views.force_change_password, name='force_change_password'),
    
    # 管理员功能
    path('admin/reset_password/<int:user_id>/', views.admin_reset_password, name='admin_reset_password'),
    path('admin/feature_switches/', views.admin_feature_switches, name='admin_feature_switches'),
    path('admin/toggle_feature_switch/<int:switch_id>/', views.admin_toggle_feature_switch, name='admin_toggle_feature_switch'),
    
    # 个人空间相关
    path('space/', views.personal_space, name='personal_space'),
    path('space/<int:user_id>/', views.personal_space, name='personal_space'),
    path('achievements/', views.achievement_list, name='achievements'),
    path('send_message/<int:user_id>/', views.send_message, name='send_message'),
    
    # API接口
    path('api/checkin/', views.check_in, name='api_checkin'),
    path('api/stats/', views.api_user_stats, name='api_user_stats'),
    path('api/stats/<int:user_id>/', views.api_user_stats, name='api_user_stats'),
    path('api/battles/', views.api_recent_battles, name='api_recent_battles'),
    path('api/battles/<int:user_id>/', views.api_recent_battles, name='api_recent_battles'),
    path('api/battles/<int:user_id>/', views.api_recent_battles, name='api_recent_battles'),
]